Repository navigation
build: pin internal crate versions so releases stop recompiling every crate - #1302
Merged
Merged
Conversation
… crate A crate's version is part of its Cargo build identity, so the shared release version in [workspace.package] recompiled all 21 crates after every release. Only sqlbuild-cli and sqlbuild-python now carry the release version; the others inherit a fixed 0.0.0. Lower crates that read CARGO_PKG_VERSION now take the release from the release crates: the built-in Rules fingerprint uses the native build identity, and the Recall schema version row records the producer version passed in through DdlOptions. The native layering check fails if a lower crate reads CARGO_PKG_VERSION again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A crate's version is part of its Cargo build identity. Release Please bumped the shared
[workspace.package]version, so every release recompiled all 21 crates. That cost was paid after each release by every local checkout and by fresh orb setup.Changes
0.0.0. Onlysqlbuild-cliandsqlbuild-pythoncarry the release version. Release Please now bumps those two manifests, and the release allowlists inverify.ymlandrelease-please.ymlmatch.CARGO_PKG_VERSION:NATIVE_BUILD_IDENTITYas their implementation fingerprint.NATIVE_BUILD_IDENTITYis now the source hash alone. That hash covers the release manifests, so it still changes with every release.producer_versionpassed in throughDdlOptions.CARGO_PKG_VERSION.rules,refactor,project,cliandpythonstill rebuild on each release, because the build identity hashes the release manifests. The other 16 crates stay compiled.DuckShop needs no case: this changes build and release metadata, not project shapes, data or lifecycles.
Verification
make check-cipasses.cargo test -p sqlbuild-recall -p sqlbuild-rulespasses. Reverting the Recall row to the crate version fails the new DDL assertion.check_native_layering, Verify's metadata-only detection and the release allowlist.sqb --versionreports0.187.3, and the Recall--ddlintegration test now checks the installed release version.